/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: zhongyisheng
 * Date: 2024-07-05
 * Time: 12:27
 */
class  MyValue{
    public int val;
}

public class Test {
    public static void swap(MyValue myV1,
                            MyValue myV2) {
    int tmp = myV1.val;
    myV1.val = myV2.val;
    myV2.val = tmp;

    }

    public static void main(String[] args) {
        MyValue myValue1 = new MyValue();
        MyValue myValue2 = new MyValue();

        myValue1.val = 10;
        myValue2.val = 20;

        swap(myValue1,myValue2);
    }
}
